package org.lanyu.springainovel.novel.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 书籍卷实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("book_volume")
public class BookVolume {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 书籍ID
     */
    @TableField("book_id")
    private Long bookId;

    /**
     * 卷号
     */
    @TableField("volume_number")
    private Integer volumeNumber;

    /**
     * 卷标题
     */
    @TableField("volume_title")
    private String volumeTitle;

    /**
     * 卷简介
     */
    @TableField("volume_description")
    private String volumeDescription;

    /**
     * 起始章节号
     */
    @TableField("start_chapter")
    private Integer startChapter;

    /**
     * 结束章节号
     */
    @TableField("end_chapter")
    private Integer endChapter;

    /**
     * 卷字数
     */
    @TableField("word_count")
    private Integer wordCount;

    /**
     * 状态：0-草稿，1-已完成
     */
    @TableField("status")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}